// Project name:JavaRedis
// Creator:muhong
// Date time:2022/11/25,10:23 下午
// Name:ChannelHandlerPipeline

package org.gmh.channel.handler;

import org.gmh.channel.Channel;
import org.gmh.channel.ChannelHandler;
import org.gmh.util.concurrent.EventExecutorGroup;

public interface ChannelPipeline extends ChannelInboundInvoker, ChannelOutboundInvoker {

    ChannelPipeline addLast(EventExecutorGroup group, ChannelHandler handler, String name);

    ChannelPipeline addLast(ChannelHandler... handlers);

    ChannelPipeline addLast(EventExecutorGroup group, ChannelHandler... handlers);

    Channel channel();

    @Override
    ChannelInboundInvoker fireChannelUnregistered();

    @Override
    ChannelPipeline fireChannelRegistered();

    @Override
    ChannelPipeline fireChannelRead(Object msg);

    @Override
    ChannelPipeline fireExceptionCaught(Throwable cause);

    @Override
    ChannelPipeline fireChannelActive();

    @Override
    ChannelInboundInvoker fireChannelInactive();

    @Override
    ChannelInboundInvoker fireChannelReadComplete();

    @Override
    ChannelInboundInvoker fireUserEventTriggered(Object event);

    @Override
    ChannelInboundInvoker fireChannelWritabilityChanged();
}
